contract;

#[allow(dead_code)]
enum StandardEnum {
    One: b256,
    Two: u32,
    Three: bool,
}

#[allow(dead_code)]
enum UnitEnum {
    One: (),
    Two: (),
    Three: (),
}

#[allow(dead_code)]
enum MaxedOutVariantsEnum {
    Variant0: u8,
    Variant1: u8,
    Variant2: u8,
    Variant3: u8,
    Variant4: u8,
    Variant5: u8,
    Variant6: u8,
    Variant7: u8,
    Variant8: u8,
    Variant9: u8,
    Variant10: u8,
    Variant11: u8,
    Variant12: u8,
    Variant13: u8,
    Variant14: u8,
    Variant15: u8,
    Variant16: u8,
    Variant17: u8,
    Variant18: u8,
    Variant19: u8,
    Variant20: u8,
    Variant21: u8,
    Variant22: u8,
    Variant23: u8,
    Variant24: u8,
    Variant25: u8,
    Variant26: u8,
    Variant27: u8,
    Variant28: u8,
    Variant29: u8,
    Variant30: u8,
    Variant31: u8,
    Variant32: u8,
    Variant33: u8,
    Variant34: u8,
    Variant35: u8,
    Variant36: u8,
    Variant37: u8,
    Variant38: u8,
    Variant39: u8,
    Variant40: u8,
    Variant41: u8,
    Variant42: u8,
    Variant43: u8,
    Variant44: u8,
    Variant45: u8,
    Variant46: u8,
    Variant47: u8,
    Variant48: u8,
    Variant49: u8,
    Variant50: u8,
    Variant51: u8,
    Variant52: u8,
    Variant53: u8,
    Variant54: u8,
    Variant55: u8,
    Variant56: u8,
    Variant57: u8,
    Variant58: u8,
    Variant59: u8,
    Variant60: u8,
    Variant61: u8,
    Variant62: u8,
    Variant63: u8,
    Variant64: u8,
    Variant65: u8,
    Variant66: u8,
    Variant67: u8,
    Variant68: u8,
    Variant69: u8,
    Variant70: u8,
    Variant71: u8,
    Variant72: u8,
    Variant73: u8,
    Variant74: u8,
    Variant75: u8,
    Variant76: u8,
    Variant77: u8,
    Variant78: u8,
    Variant79: u8,
    Variant80: u8,
    Variant81: u8,
    Variant82: u8,
    Variant83: u8,
    Variant84: u8,
    Variant85: u8,
    Variant86: u8,
    Variant87: u8,
    Variant88: u8,
    Variant89: u8,
    Variant90: u8,
    Variant91: u8,
    Variant92: u8,
    Variant93: u8,
    Variant94: u8,
    Variant95: u8,
    Variant96: u8,
    Variant97: u8,
    Variant98: u8,
    Variant99: u8,
    Variant100: u8,
    Variant101: u8,
    Variant102: u8,
    Variant103: u8,
    Variant104: u8,
    Variant105: u8,
    Variant106: u8,
    Variant107: u8,
    Variant108: u8,
    Variant109: u8,
    Variant110: u8,
    Variant111: u8,
    Variant112: u8,
    Variant113: u8,
    Variant114: u8,
    Variant115: u8,
    Variant116: u8,
    Variant117: u8,
    Variant118: u8,
    Variant119: u8,
    Variant120: u8,
    Variant121: u8,
    Variant122: u8,
    Variant123: u8,
    Variant124: u8,
    Variant125: u8,
    Variant126: u8,
    Variant127: u8,
    Variant128: u8,
    Variant129: u8,
    Variant130: u8,
    Variant131: u8,
    Variant132: u8,
    Variant133: u8,
    Variant134: u8,
    Variant135: u8,
    Variant136: u8,
    Variant137: u8,
    Variant138: u8,
    Variant139: u8,
    Variant140: u8,
    Variant141: u8,
    Variant142: u8,
    Variant143: u8,
    Variant144: u8,
    Variant145: u8,
    Variant146: u8,
    Variant147: u8,
    Variant148: u8,
    Variant149: u8,
    Variant150: u8,
    Variant151: u8,
    Variant152: u8,
    Variant153: u8,
    Variant154: u8,
    Variant155: u8,
    Variant156: u8,
    Variant157: u8,
    Variant158: u8,
    Variant159: u8,
    Variant160: u8,
    Variant161: u8,
    Variant162: u8,
    Variant163: u8,
    Variant164: u8,
    Variant165: u8,
    Variant166: u8,
    Variant167: u8,
    Variant168: u8,
    Variant169: u8,
    Variant170: u8,
    Variant171: u8,
    Variant172: u8,
    Variant173: u8,
    Variant174: u8,
    Variant175: u8,
    Variant176: u8,
    Variant177: u8,
    Variant178: u8,
    Variant179: u8,
    Variant180: u8,
    Variant181: u8,
    Variant182: u8,
    Variant183: u8,
    Variant184: u8,
    Variant185: u8,
    Variant186: u8,
    Variant187: u8,
    Variant188: u8,
    Variant189: u8,
    Variant190: u8,
    Variant191: u8,
    Variant192: u8,
    Variant193: u8,
    Variant194: u8,
    Variant195: u8,
    Variant196: u8,
    Variant197: u8,
    Variant198: u8,
    Variant199: u8,
    Variant200: u8,
    Variant201: u8,
    Variant202: u8,
    Variant203: u8,
    Variant204: u8,
    Variant205: u8,
    Variant206: u8,
    Variant207: u8,
    Variant208: u8,
    Variant209: u8,
    Variant210: u8,
    Variant211: u8,
    Variant212: u8,
    Variant213: u8,
    Variant214: u8,
    Variant215: u8,
    Variant216: u8,
    Variant217: u8,
    Variant218: u8,
    Variant219: u8,
    Variant220: u8,
    Variant221: u8,
    Variant222: u8,
    Variant223: u8,
    Variant224: u8,
    Variant225: u8,
    Variant226: u8,
    Variant227: u8,
    Variant228: u8,
    Variant229: u8,
    Variant230: u8,
    Variant231: u8,
    Variant232: u8,
    Variant233: u8,
    Variant234: u8,
    Variant235: u8,
    Variant236: u8,
    Variant237: u8,
    Variant238: u8,
    Variant239: u8,
    Variant240: u8,
    Variant241: u8,
    Variant242: u8,
    Variant243: u8,
    Variant244: u8,
    Variant245: u8,
    Variant246: u8,
    Variant247: u8,
    Variant248: u8,
    Variant249: u8,
    Variant250: u8,
    Variant251: u8,
    Variant252: u8,
    Variant253: u8,
    Variant254: u8,
    Variant255: u8,
}

abi EnumTesting {
    fn get_standard_enum() -> StandardEnum;

    fn check_standard_enum_integrity(arg: StandardEnum) -> bool;
    fn get_max_variant() -> MaxedOutVariantsEnum;

    fn get_unit_enum() -> UnitEnum;
    fn check_unit_enum_integrity(arg: UnitEnum) -> bool;
}

impl EnumTesting for Contract {
    fn get_standard_enum() -> StandardEnum {
        StandardEnum::Two(12345u32)
    }
    fn check_standard_enum_integrity(arg: StandardEnum) -> bool {
        match arg {
            StandardEnum::Two(value) => {
                value == 12345u32
            },
            _ => {
                false
            }
        }
    }

    fn get_max_variant() -> MaxedOutVariantsEnum {
        MaxedOutVariantsEnum::Variant255(11)
    }

    fn get_unit_enum() -> UnitEnum {
        UnitEnum::Two
    }
    fn check_unit_enum_integrity(arg: UnitEnum) -> bool {
        match arg {
            UnitEnum::Two => {
                true
            },
            _ => {
                false
            }
        }
    }
}
